package com.mfcxy.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mfcxy.entity.Permissions;
import com.mfcxy.mapper.IPermissionsMapper;
import com.mfcxy.service.IPermissionsService;

/**
 * 
 * @author mfcxy
 *
 */
@Service
public class PermissionsService extends BaseService implements IPermissionsService {
	@Autowired
	private IPermissionsMapper permissionsMapper;

	/**
	 * 新增
	 * @param p
	 * @return
	 */
	public int save(Permissions p) {
		return permissionsMapper.save(p);
	}
	
	/**
	 * 根据pid查询数据
	 * @param pid
	 * @return
	 */
	public List<Permissions> selectList(int pid) {
		return permissionsMapper.selectList(pid);
	}

	/**
	 * 更新
	 * @param p
	 * @return
	 */
	public int update(Permissions p) {
		return permissionsMapper.update(p);
	}

	/**
	 * 删除
	 * @param id
	 * @return
	 */
	public int del(int id) {
		return permissionsMapper.del(id);
	}
}
